package com.lhkj.ct.meta.modules.patient.model.dto;


import com.lhkj.ct.meta.modules.auth.entity.TblUserIdentity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.time.LocalDate;
import java.util.List;

@Setter
@Getter
public class PatBasicInfo implements Serializable {

    @ApiModelProperty(value = "头像")
    private String patAvatar;

    @ApiModelProperty(value = "姓名", notes = "姓名不支持用户自己修改")
    private String patName;

    @NotBlank(message = "性别不能为空")
    @ApiModelProperty(value = "性别")
    private String patSex;

    @NotNull(message = "出生日期不能为空")
    @ApiModelProperty(value = "出生日期")
    private LocalDate patBirthday;

    @NotBlank(message = "证件类型不能为空")
    @ApiModelProperty(value = "证件类型")
    private String patIdentType;

    @NotBlank(message = "证件号码不能为空")
    @ApiModelProperty(value = "证件号码")
    private String patIdentNo;

    @Email(message = "邮箱格式不合法", regexp = "^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,6}$")
    @ApiModelProperty(value = "邮箱")
    private String patEmail;

    @ApiModelProperty(value = "手机号")
    private String patMobile;

    @ApiModelProperty(value = "地址")
    private String patAddress;

    @ApiModelProperty(value = "建档机构")
    private String patOrgan;

    @ApiModelProperty(value = "授权如账号，公众号等")
    private List<TblUserIdentity> identities;

}
